package org.zoomdev.zoom.dao.meta;

public final class DefaultValue {

    private final String value;
    private final DefaultValueType type;

    private DefaultValue(String value, DefaultValueType type) {
        this.value = value;
        this.type = type;
    }

    public static DefaultValue value(String value) {
        return new DefaultValue(value, DefaultValueType.value);
    }

    /**
     * 默认值函数
     *
     * @param value
     * @return
     */
    public static DefaultValue function(String value) {
        return new DefaultValue(value, DefaultValueType.func);
    }

    public enum DefaultValueType {
        func,
        value,
    }

    public String getValue() {
        return value;
    }

    public DefaultValueType getType() {
        return type;
    }


}
